function generateDiag(layout,type, output_msg, height, width) {
   
    var icon="";
    if (!output_msg)
        output_msg = 'No Message to Display.';
    var msg="<p>";
    if(type == "success"){
    	icon="<span class='ui-icon ui-icon-circle-check' style='float: left; margin-right: .3em;'></span>"
    	msg=msg+icon;
    }else if(type="error"){
    	icon="<span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>"
    	msg=msg+icon;
    }else if(type="warning"){    	
    	icon="<span class='ui-icon ui-icon-notice' style='float: left; margin-right: .3em;'></span>"
    	msg=msg+icon
    }else{
    	icon="<span class='ui-icon ui-icon-info' style='float: left; margin-right: .3em;'></span>"
    	msg=msg+icon;
    }
    msg=msg+output_msg;
    msg=msg+"</p>"
    var options = {
    	resizable: false,
	    modal: true,
	    buttons: {
	        "Ok": function() 
	        {
	            $( this ).dialog( "close" );
	        }
	    },
	    open: function(){
	    	$(this).dialog( "option", "title", type)
	    }
    }
    
    if (!!height &&  !!width){
    	options.width=width;
    	options.height=height;
    }
    $("#alertDialog").html(msg).dialog(options);
    
}


function getDeploymentData(server_id, callback){
	$.ajaxq("deploy",{
		type: "POST",
		url: "getDeployStatus.htm",
	    dataType: 'json',
	    data: {
	    	serverId: server_id
	    },
	    success: function( json ) {
	    //	console.log("GetDeploymentData "+json);
	    	callback(json);
	    },
	    error: function( xhr, status ) {
	    	generateDiag("center","error", status);
	    },
	  });  	
}



 